<?php
include("../include/header.inc.php");

include('../Include/functions.inc.php');
?>
<div data-role="page" id="home">
    <!-- Header -->
    <?php
       include("../Include/banner.inc.php")
    ?>

    <div data-role="content">
        <?php
            $id = $_GET['id'];
            $name = getMediaInfos($id);
            $name = mysql_fetch_array($name);
            
        ?>
        <h2><?php echo $name[0]; ?></h2>
        
        <?php
            //Audio
            if($name[2] == 1){
                echo "<audio controls='controls'>";
                  echo "<source src='../ConsoleAdmin/Medias/$name[1]' type='audio/mpeg' />";
                   echo "Your browser does not support the audio element.";
                 echo "</audio>";
            }
            
            //Vidéo
            if($name[2] == 2){
                
                echo "<iframe width='320' height='240' src='http://www.youtube.com/embed/$name[1]' frameborder='0' allowfullscreen></iframe>";
                
                echo "</br><a data-role='button' href='/Rilke/Medias/infosParticipant.php?id=$id' target='_self'>";
                echo $textes['vote'][$_COOKIE['lang']];
                echo "</a>";
            }
            
            //Images
            if($name[2] == 3){
                echo "<img src='../ConsoleAdmin/Medias/$name[1]' width='400'/>";
            }
        ?>
             <!-- AddThis Button BEGIN -->
             <div style="margin-top: 30px;" class="addthis_toolbox addthis_default_style addthis_32x32_style">
                <a class="addthis_button_preferred_1"></a>
                <a class="addthis_button_preferred_2"></a>
                <a class="addthis_button_preferred_3"></a>
                <a class="addthis_button_preferred_8"></a>
                <a class="addthis_button_preferred_9"></a>
                <a class="addthis_button_preferred_10"></a>
                <a class="addthis_counter addthis_bubble_style"></a>
             </div>
                <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4f15974f61ac66dc"></script>
            <!-- AddThis Button END -->
        
    </div>
    <!-- Footer -->
    <?php
    include("../Include/footer.inc.php")
    ?>
</div>